package com.itheima.test.Factory;

import com.itheima.test.demo02.Animal;
import com.itheima.test.demo02.Cat;
import com.itheima.test.demo02.Dog;


public class AnimalFactory {

    public static Animal getFactory() {
        int a = 1;
        if (a == 0) {
            return new Cat();
        } else {
            return new Dog();
        }
    }
}
